package service;

import dao.AdminTypeDao;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import pojo.Products;
import pojo.Products_type;

import java.util.List;

@Service("adminTypeService")
@Transactional
public class AdminTypeService {
    @Autowired
    private AdminTypeDao adminTypeDao;
    public int aT(Products_type products_type){return adminTypeDao.addType(products_type);}
    public int dT(Integer id){return adminTypeDao.deleteType(id);}
    public List<Products_type> sAT(){return adminTypeDao.selectAllType();}
}
